home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / CIncludes / ConnectionTools.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-29  |  2.5 KB  |  129 lines  |  [TEXT/MPS ]

  1.  
  2. /************************************************************
  3.  
  4. Created: Wednesday, September 11, 1991 at 1:47 PM
  5.  ConnectionTools.h
  6.  C Interface to the Macintosh Libraries
  7.  
  8.  
  9.   Copyright Apple Computer, Inc. 1988-1991
  10.   All rights reserved
  11.  
  12. ************************************************************/
  13.  
  14.  
  15. #ifndef __CONNECTIONTOOLS__
  16. #define __CONNECTIONTOOLS__
  17.  
  18. #ifndef __DIALOGS__
  19. #include <Dialogs.h>
  20. #endif
  21.  
  22. #ifndef __CONNECTIONS__
  23. #include <Connections.h>
  24. #endif
  25.  
  26.  
  27. enum {
  28.  
  29.  
  30. /* messages for DefProc */
  31.  cmInitMsg = 0,
  32.  cmDisposeMsg = 1,
  33.  cmSuspendMsg = 2,
  34.  cmResumeMsg = 3,
  35.  cmMenuMsg = 4,
  36.  cmEventMsg = 5,
  37.  cmActivateMsg = 6,
  38.  cmDeactivateMsg = 7,
  39.  
  40.  cmIdleMsg = 50,
  41.  cmResetMsg = 51,
  42.  cmAbortMsg = 52,
  43.  
  44.  cmReadMsg = 100,
  45.  cmWriteMsg = 101,
  46.  cmStatusMsg = 102,
  47.  cmListenMsg = 103,
  48.  cmAcceptMsg = 104,
  49.  cmCloseMsg = 105,
  50.  cmOpenMsg = 106,
  51.  cmBreakMsg = 107,
  52.  cmIOKillMsg = 108
  53. };
  54. enum {
  55.  cmEnvironsMsg = 109,
  56.  
  57. /* new connection tool messages for ctb 1.1 */
  58.  cmNewIOPBMsg = 110,
  59.  cmDisposeIOPBMsg = 111,
  60.  cmGetErrorStringMsg = 112,
  61.  cmPBReadMsg = 113,
  62.  cmPBWriteMsg = 114,
  63.  cmPBIOKillMsg = 115,
  64.  
  65. /*    messages for validate DefProc    */
  66.  cmValidateMsg = 0,
  67.  cmDefaultMsg = 1,
  68.  
  69. /*    messages for Setup DefProc    */
  70.  cmSpreflightMsg = 0,
  71.  cmSsetupMsg = 1,
  72.  cmSitemMsg = 2,
  73.  cmSfilterMsg = 3,
  74.  cmScleanupMsg = 4,
  75.  
  76. /*    messages for scripting defProc    */
  77.  cmMgetMsg = 0,
  78.  cmMsetMsg = 1,
  79.  
  80. /*    messages for localization defProc    */
  81.  cmL2English = 0,
  82.  cmL2Intl = 1
  83.  
  84. /*    private data constants */
  85.  
  86. #define cdefType 'cdef'        /* main connection definition procedure    */
  87. #define cvalType 'cval'        /* validation definition procedure    */
  88. #define csetType 'cset'        /* connection setup definition procedure    */
  89. #define clocType 'cloc'        /* connection configuration localization defProc    */
  90. #define cscrType 'cscr'        /* connection scripting defProc interfaces    */
  91.  
  92. #define cbndType 'cbnd'        /* bundle type for connection    */
  93. #define cverType 'vers'
  94. };
  95.  
  96. struct CMDataBuffer {
  97.  Ptr thePtr;
  98.  long count;
  99.  CMChannel channel;
  100.  CMFlags flags;
  101. };
  102.  
  103. typedef struct CMDataBuffer CMDataBuffer;
  104. typedef CMDataBuffer *CMDataBufferPtr;
  105.  
  106. struct CMCompletorRecord {
  107.  Boolean async;
  108.  ProcPtr completionRoutine;
  109. };
  110.  
  111. typedef struct CMCompletorRecord CMCompletorRecord;
  112. typedef CMCompletorRecord *CMCompletorPtr;
  113.  
  114. /* Private Data Structure */
  115.  
  116. struct CMSetupStruct {
  117.  DialogPtr theDialog;
  118.  short count;
  119.  Ptr theConfig;
  120.  short procID;                /* procID of the tool */
  121. };
  122.  
  123. typedef struct CMSetupStruct CMSetupStruct;
  124. typedef CMSetupStruct *CMSetupPtr;
  125.  
  126.  
  127.  
  128. #endif
  129.